package com.nwpu.server.learning.controller;

import com.nwpu.server.common.response.R;
import com.nwpu.server.learning.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: YuXingZh
 * @Date: Created in 16:57 2022-04-03
 * @Description: redis 上传接口
 */
@RestController
@RequestMapping("learning/redis")
public class RedisController {

    @Autowired
    RedisService redisService;

    /**
     * 饼状图
     */
    @RequestMapping("/chart")
    public R chart() {
        Map<Object, Object> chart = redisService.getGeneRelationship();

        return R.ok().put("chart", chart);
    }
}
